Tomáš Pospíšek's Notizblock

ssh and "Changing password for root"

So I set up a new server at a hoster. First log in via ssh:

WARNING: Your password has expired.
Changing password for root.
Current password: 
New password: 
Retype new password: 

OK, done. Second login:

Last login: Sun Dec 13 18:30:17 2020 from W.X.Y.Z
Changing password for root.
Current password: 

what the...?

Also /var/log/auth.log would contain this:

fatal: PAM: pam_chauthtok(): Authentication token manipulation error

Turns out this is some weird behavior when ssh connection multiplexing is on: if you reuse/multiplex over the previous ssh connection, where you were asked to change your password, you will be asked again.

However if you do not connect over the established ssh connection (by using -o ControlPath=none) then you will be able to log in without being asked to change your password again. Weird, weird.

Tomáš Pospíšek, 2020-12-13

Articles